<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
        <h:head>
            <title>#{msg.applicationtitle} #{msg.version}</title>
            <ui:debug rendered="#{initParam['javax.faces.PROJECT_STAGE'] eq 'Development'}" hotkey="0"/>
            <h:outputStylesheet name="main.css" library="css" />
        </h:head>
        <h:body>
            <ui:insert name="menu">
                <c:if test="#{user.sessionId != null and user.id gt 0}">
                    <ui:include src="menu.xhtml" />
                </c:if>
            </ui:insert>
            <ui:insert name="body">
                <!--Dersom har vi ikke pålogget bruker, så viser vi login page-->
                <c:if test="#{user.sessionId == null or user.id lt 0}">
                    <ui:include src="login.xhtml" />
                </c:if>
                <c:if test="#{user.sessionId != null and user.id gt 0}">
                    <ui:include src="main.xhtml" />
                </c:if>
            </ui:insert>
        </h:body>
</html>

